/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tcnplanner;

import com.sun.jmx.snmp.Enumerated;
import java.io.Serializable;
import java.persistence.*;
import tcnplanner.Controller.ActorType;

/**
 *
 * @author Koen
 */
@Entity
@NamedQueries ({
@NamedQuery(name = "Account.findbyUsername", query = "select a from Account as a where a.username = :username"),
@NamedQuery(name = "Account.findAll", query = "select a from Account as a")
            })
public class Account implements Serializable {

    @Id
    private String username;
    private String password;
    @Enumerated(EnumType.STRING)
    private Controller.ActorType actortype;
    private String name;
    private String adres;
    private String telephone;
    private String email;

    public Account(){
    }

    public Account(String username, String password, ActorType actortype, String name, String adres, String telephone, String email) {
        this.username = username;
        this.password = password;
        this.actortype = actortype;
        this.name = name;
        this.adres = adres;
        this.telephone = telephone;
        this.email = email;
    }

    public String getUsername() {
        return username;
    }

    public ActorType getActortype() {
        return actortype;
    }

    public String getAdres() {
        return adres;
    }

    public String getEmail() {
        return email;
    }

    public String getName() {
        return name;
    }

    public String getPassword() {
        return password;
    }

    public String getTelephone() {
        return telephone;
    }
    @Override
    public String toString(){
        return name;
    }
    

  
}
